<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <!--<link th:href="@{/css/style.css}" rel="stylesheet" type="text/css" media="all" />-->
    <script type="application/javascript" th:src ="@{/js/jquery-2.2.3.min.js}"></script>
</head>
<body>
<div  style="width:100%;padding-top:120px;text-align:center;">

    <script th:inline="javascript">

        var wea=[[${fh.wea}]]
        if (wea.charAt(wea.length-1)=="晴")show1();
        else if (wea.charAt(wea.length-1)=="雨")show2();
        else show3();
        function show1() {
            $("body").css("background", "url(/images/1.jpg) repeat 0px 0px")
        }
        function show2() {
            $("body").css("background", "url(/images/2.jpg) repeat 0px 0px")
        }
        function show3() {
            $("body").css("background", "url(/images/3.jpg) repeat 0px 0px")
        }
    </script>
</div>
</body>
</html>